package ${model.packageName}.web;

import java.util.HashMap;
import java.util.Map;
import java.util.List;

import org.apache.struts.action.ActionForm;
<#list model.childModels as childModel>
import ${model.packageName}.domain.${childModel.initUpperName};
</#list>
import com.dhc.sms.rep.common.SearchCondition;

/**
 * ${model.desc} Form瀵硅薄
 */
public class ${model.initUpperName}Form extends ActionForm {

	<#list model.fields as field>
	/**
	 * ${field.desc}
	 */
	private String ${field.name};
	</#list>
	<#list model.childModels as childModel>
	/**
	 * ${childModel.desc}
	 */
	private List<${childModel.initUpperName}> ${childModel.initLowerName}List;
	</#list>
	
	<#list model.fields as field>
	public String get${field.name?cap_first}() {
		return ${field.name};
	}
	public void set${field.name?cap_first}(String ${field.name}) {
		this.${field.name} = ${field.name};
	}
	</#list>	
	<#list model.childModels as childModel>
	public List<${childModel.initUpperName}> get${childModel.initUpperName}List() {
		return ${childModel.initLowerName}List;
	}
	public void set${childModel.initUpperName}List(List<${childModel.initUpperName}> ${childModel.initLowerName}List) {
		this.${childModel.initLowerName}List = ${childModel.initLowerName}List;
	}
	</#list>	
	
	/**
	 * 寮傛鎶ヨ〃浣跨敤锛岀敤浜庝繚瀛樺鍑烘潯浠�
	 */
	public SearchCondition getConditionInit() {
		SearchCondition condition = new SearchCondition();
		Map<String, Object> conditionMap = new HashMap<String, Object>();
		<#list model.fields as field>
		conditionMap.put("${field.name}", ${field.name});
		</#list>
		
		condition.setCondition(conditionMap);
		return condition;
	}	
}